<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    /*
    | -------------------------------------------------------------------------
    | URI ROUTING
    | -------------------------------------------------------------------------
    | -------------------------------------------------------------------------
    | RESERVED ROUTES
    | -------------------------------------------------------------------------
    |
    | There area two reserved routes:
    |
    |	$route['default_controller'] = 'welcome';
    |
    | This route indicates which controller class should be loaded if the
    | URI contains no data. In the above example, the "welcome" class
    | would be loaded.
    |
    |	$route['404_override'] = 'errors/page_missing';
    |
    | This route will tell the Router what URI segments to use if those provided
    | in the URL cannot be matched to a valid route.
    |
    */

    $route['default_controller'] = "home";
    $route['404_override'] = 'home';

    $route['(:any)/home'] = "home/home_page";
    $route['(:any)/search'] = "home/search";
    $route['(:any)/details/(:any)'] = "home/details/$2";
    $route['(:any)/popular/(:any)/(:any)'] = "home/popular/$2/$3";
    $route['(:any)/popular/(:any)'] = "home/popular/$2";

    // override: '/en/about' -> use controller 'about'
    $route['^me/(.+)$'] = "$1";
    $route['^ru/(.+)$'] = "$1";
    $route['^en/(.+)$'] = "$1";
    $route['^fr/(.+)$'] = "$1";
    $route['^al/(.+)$'] = "$1";

    // '/en' and '/fr' -> use default controller
    $route['^me$'] = $route['default_controller'];
    $route['^ru$'] = $route['default_controller'];
    $route['^en$'] = $route['default_controller'];
    $route['^fr$'] = $route['default_controller'];
    $route['^al$'] = $route['default_controller'];


    /* End of file routes.php */
    /* Location: ./application/config/routes.php */